﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Xml;

namespace Shipwire.Messages
{
    [XmlRootAttribute("InventoryUpdateResponse")]
    public class InventoryUpdateResponse : ShipwireResponse
    {
        [XmlElement("Product")]
        public InventoryUpdateResponseProduct[] Products { get; set; }
        public int TotalProducts { get; set; }
    }

    public class InventoryUpdateResponseProduct
    {
        [XmlAttribute("code")]
        public string Code { get; set; }
        [XmlAttribute("quantity")]
        public int Quantity { get; set; }
        [XmlAttribute("good")]
        public int Good { get; set; }
        [XmlAttribute("pending")]
        public int Pending { get; set; }
        [XmlAttribute("backOrdered")]
        public int BackOrdered { get; set; }
        [XmlAttribute("reserved")]
        public int Reserved { get; set; }
        [XmlAttribute("shipping")]
        public int Shipping { get; set; }
        [XmlAttribute("shipped")]
        public int Shipped { get; set; }
        [XmlAttribute("consuming")]
        public int Consuming { get; set; }
        [XmlAttribute("creating")]
        public int Creating { get; set; }
        [XmlAttribute("created")]
        public int Created { get; set; }
        [XmlAttribute("availableDate")]
        public DateTime AvailableDate { get; set; }
        [XmlAttribute("shippedLastDay")]
        public int ShippedLastDay { get; set; }
        [XmlAttribute("shippedLastWeek")]
        public int ShippedLastWeek { get; set; }
        [XmlAttribute("shippedLast4Weeks")]
        public int ShippedLast4Weeks { get; set; }
        [XmlAttribute("orderedLastDay")]
        public int OrderedLastDay { get; set; }
        [XmlAttribute("orderedLastWeek")]
        public int OrderedLastWeek { get; set; }
        [XmlAttribute("orderedLast4Weeks")]
        public int OrderedLast4Weeks { get; set; }
    }
}
